CREATE TABLE [dbo].[DnnProduct_CDS_Categories]
(
[ID] [int] NOT NULL IDENTITY(1, 1) NOT FOR REPLICATION,
[DistributorID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Name] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Description] [nvarchar] (1024) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ParentID] [int] NULL,
[Path] [varchar] (4000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IsReadOnly] [bit] NOT NULL CONSTRAINT [DF__DnnProduc__IsRea__13C7D8B9] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_CDS_Categories] ADD CONSTRAINT [PK_DnnProduct_CDS_Categories] PRIMARY KEY CLUSTERED  ([ID]) WITH (FILLFACTOR=85) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_DnnProduct_CDS_Categories_ParentID] ON [dbo].[DnnProduct_CDS_Categories] ([ParentID]) WITH (FILLFACTOR=85) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_CDS_Categories] WITH NOCHECK ADD CONSTRAINT [FK_DnnProduct_CDS_Categories_DnnProduct_CDS_Categories] FOREIGN KEY ([ParentID]) REFERENCES [dbo].[DnnProduct_CDS_Categories] ([ID]) NOT FOR REPLICATION
GO
